<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<!--v-cloak是斗篷的意思，加载完app再显示文本-->
<div id="app">
    <img v-bind:src="imageUrl" alt="">
    <a v-bind:href="aHref">百度一下</a>

    <img :src="imageUrl" alt="">
    <a :href="aHref">百度一下</a>

</div>


<script src="../js/vue.js"></script>
<script>

    const app = new Vue({
            el: '#app',
            data: {
                message: 'hello xw',
                name: 'hello vue',
                movies: ['西游记','红楼梦','水浒传','三国演义'],
                counter: 0,
                imageUrl: 'https://img14.360buyimg.com/n0/jfs/t1/161615/19/15630/106971/6061af3cEe6f3afed/3635de89bed25f46.jpg',
                aHref: 'http://www.baidu.com',
                url: '<a href="http://www.baidu.com">百度一下</a>'
            },
            methods: {
                add: function () {
                    console.log('add被执行');
                    this.counter++
                },
                sub: function () {
                    console.log('sub被执行');
                    this.counter--
                }
            }
      })


</script>

</body>
</html>